package com.itheima.z1.dao;

import com.itheima.z1.domain.Teacher;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/*@Mapper
public interface TeacherDao {

    @Select("select * from teacher")
    List<Teacher> findAll();

    @Select("select * from teacher where id=#{id}")
    Teacher findById(int id);

    @Select("select * from teacher where name=#{name}")
    List<Teacher> findByName(String name);

    @Insert("insert into teacher(name) values(#{name})")
    void save(Teacher teacher);

    @Insert("update teacher set name=#{name} where id=#{id}")
    void update(Teacher teacher);

    @Delete("delete from teacher where id=#{id}")
    void delete(int id);
}*/
